﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Web;
//using System.Web.Mvc;
//using Framework.Authority;
//using Framework.Mvc.Util;
//using Framework.Serializer;
//using Framework.Common;
//namespace Framework.Mvc.Controllers
//{
//    public class ModuleController : AuthorityBaseController
//    {

//        public override ActionResult Delete()
//        {
//            throw new NotImplementedException();
//        }

//        public override ActionResult GridJson()
//        {
//            int count;
//            var list = Auth.GetModule(GridPageSize, GridPageIndex, out count);
//            return new EasyUIGridJsonResult(count, list);
//        }

//        public override ActionResult GridHead()
//        {
//            return View();
//        }

//        public override ActionResult DetailJson()
//        {
//            var model = Auth.GetModule(RequestExtention.GetInt("ModuleID"));
//            return Json(model);
//        }

//        public override ActionResult Detail()
//        {
//            int count;
//            ViewBag.Apps = Auth.GetApp(1000, GridPageIndex, out count).SToStringNewtonsoftJson();
//            return View();
//        }

//        public override ActionResult Edit()
//        {
//            var module = new SysModule();
//            module.ModuleName = RequestExtention.GetString("ModuleName");
//            module.ModuleID = RequestExtention.GetInt("ModuleID");
//            module.ModuleOpTime = DateTime.Now;
//            string apps = RequestExtention.GetString("SysApp");
//            module.SysApp = apps.Split(',').Select(i => new SysApp { AppOpTime = DateTime.Now, AppID = i.StrToInt(), AppName = "" }).ToList();
//            if (module.ModuleID > 0)
//                return this.Success(Auth.Update(module));
//            return this.Success(Auth.Add(module));
//        }
//    }
//}
